<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>onblur</title>
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="../../jsfile/layer.css"/>
    <script src="../../jsfile/jquery.js"></script>
    <script src="../../jsfile/layer.js"></script>
    <script src="../../jsfile/base.js"></script>

    <script type="text/javascript">
        function onchangeFun(){
            alert("女神已经改变了");
        }


        window.onload = function (){
            //1.获取标签对象
            var selObj = document.getElementById("man");
            // alert(selObj);
            //2.通过标签对象.事件名 = function(){}
            selObj.onchange = function (){
                alert("男神已经改变了...");
            }
        }
    </script>

</head>
<body>
<p id="text_show">
onchange
</p>
<div class="look_source_code" onclick="getPageContent()">查看源码</div>
请选择你心中的女神：
<select name="" id="woman" onchange="onchangeFun()">
    <option value="">--女神--</option>
    <option value="">芳芳</option>
    <option value="">佳佳</option>
    <option value="">娘娘</option>
</select>

请选择你心中的男神:
<select name="" id="man">
    <option value="">--男神--</option>
    <option value="">国哥</option>
    <option value="">华仔</option>
    <option value="">富成</option>
</select>
</body>


</html>


